'use strict';
var Model = require('../../../Base/server/controllers/Model');

var modelField = {};
modelField.AppID = {
    type: String,
    default: '',
    trim: true,
    Name: 'AppID',
    IsUnique: true,
    IsEmpty: false
};

modelField.Name = {
    type: String,
    default:'',
    trim: true,
    Name: '名称',
    IsEmpty: false
};

modelField.FileName = {
    type: String,
    default:'',
    trim: true,
    Name: '安装文件',
    IsEmpty: false
};
modelField.FileSize = {
    type: Number
};

modelField.DisplayImage = {
    type: String,
    default: '',
    trim: true
};
modelField.DisplayImageSize = {
    type: Number
};

modelField.MouseDownImage = {
    type: String,
    default: '',
    trim: true
};
modelField.MouseDownImageSize = {
    type: Number
};

modelField.Version = {
    type: String,
    default: '',
    trim: true,
    Name: '版本号',
    IsEmpty: false
};

//描述
modelField.Describe = {
    type: String,
    default: '',
    trim: true
};

//备注
modelField.Remark = {
    type: String,
    default: '',
    trim: true
};

//类型
modelField.Type = {
    type: Number
};

//是否共享
modelField.IsShared = {
    type: Boolean
};

modelField.IsEffective = {
    type: Boolean
};

var newModel = new Model(modelField);
newModel.addIndex({Name: 1});
newModel.addIndex({Code: 1});
newModel.create('App', '终端应用');